package D924;

import java.util.Random;
import java.util.Scanner;

public class D925 {
    public static void main(String[] args) {
        String[]renji = {"石头","剪刀","布"};
        Scanner jp = new Scanner(System.in);
        while (true){
            Random r = new Random();
            int sj = r.nextInt(3);
            System.out.println("请出拳(石头，剪刀，布  )");
            String chu = jp.next();

            if (chu.equals("石头") && sj==0){
                System.out.println("平局");
            }
            if (chu.equals("石头")&& sj==1){
                System.out.println("你输了");
            }
            if (chu.equals("石头")&& sj==2){
                System.out.println("你赢了");
            }

            if (chu.equals("剪刀")&&sj==0){
                System.out.println("你赢了");
            }
            if (chu.equals("剪刀")&&sj==1){
                System.out.println("平局");
            }
            if (chu.equals("剪刀")&&sj==2){
                System.out.println("你输了");
            }

            if (chu.equals("布")&&sj==0){
                System.out.println("你赢了");
            }
            if (chu.equals("布")&&sj==1){
                System.out.println("平局");
            }
            if (chu.equals("布")&&sj==2){
                System.out.println("你输了");
            }
          if (chu.equals("eixt")){
              System.out.println("游戏退出");
              break;
          }


        }

    }
}
